<div id="content-box">
            <div class="border">
                <div class="padding">

                    <form name="appForm" method="post" action="">
                        <?php echo $this->render('group/toolbar/index.php');?>
						<div class="clr"></div>

                        <!-- BEGIN: CONTENT -->
                        <div id="element-box">
                            <div class="t">
                                <div class="t">
                                    <div class="t"></div>
                                </div>
                            </div>
                            <div class="m">
                                <!-- Area 4: In du lieu lay tu database -->
                                <table class="adminlist">
                                    <thead>
                                        <tr>
                                            <th width="200">Page</th>
                                            <th width="89">Controller</th>
                                            <th width="30"> <input type="checkbox" name="checkallview" >View</th>
                                            <th width="30"><input type="checkbox" name="checkalladd" >Add</th>						
                                            <th width="30"><input type="checkbox" name="checkalledit" >Edit</th>
                                            <th width="30"><input type="checkbox" name="checkalldelete" >Delete</th>
                                            <th width="34">User created</th>
                                            <th width="34">Date created</th>
                                            <th width="34">User updated</th>
                                            <th width="34">Date updated</th>
                                        </tr>
                                    </thead>
									
                                            <?php 
                                                foreach ($this->Items as $key => $val){
                                                    $id 			= $val['id'];
                                                    $controller                 = $val['controller'];
                                                    $link                       = $this->baseUrl('admin/'.$controller);
                                                    $title                      = $val['title']    ;
                                                    $pagename                   = '<a href="'.$link.'">'.$title.'</a>';
                                                    $v_p                        = ($val['view_p'] == 1) ? array('class'=>'view_p', 'checked'=>'checked') : array('class'=>'view_p');
                                                    $a_p                        = ($val['add_p'] == 1) ? array('class'=>'add_p', 'checked'=>'checked') : array('class'=>'add_p');
                                                    $e_p                        = ($val['edit_p'] == 1) ? array('class'=>'edit_p', 'checked'=>'checked') : array('class'=>'edit_p');
                                                    $d_p                        = ($val['delete_p'] == 1) ? array('class'=>'delete_p', 'checked'=>'checked') : array('class'=>'delete_p');
                                                    
                                                    $view_p                     = $this->formCheckbox('view_p[]', $id, $v_p);
                                                    $add_p                      = $this->formCheckbox('add_p[]', $id, $a_p);
                                                    $edit_p                     = $this->formCheckbox('edit_p[]', $id, $e_p);
                                                    $delete_p                   = $this->formCheckbox('delete_p[]', $id, $d_p);
                                                    $uidcreated                 = $val['uidcreated'];
                                                    $datecreated                = $val['datecreated'];
                                                    $uidupdated                 = $val['uidupdated'];
                                                    $dateupdated                = $val['dateupdated'];

                                            ?>
                                    <tr class="even">						
                                        <td align="left"><?php echo $pagename;?></td>
                                        <td align="center"><?php echo $controller;?></td>
                                        <td align="center"><?php echo $view_p;?></td>
                                        <td align="center"><?php echo $add_p;?></td>
                                        <td align="center"><?php echo $edit_p;?></td>
                                        <td align="center"><?php echo $delete_p;?></td>
                                        <td align="center"><?php echo $uidcreated;?></td>
                                        <td align="center"><?php echo $datecreated;?></td>
                                        <td align="center"><?php echo $uidupdated;?></td>
                                        <td align="center"><?php echo $dateupdated;?></td>
                                    </tr>
                                    
                                    <?php }?>
                                </table>
                                <!-- Area 4: In du lieu lay tu database - End -->

                                <!-- END: ELEMENT BOX -->	
                              <div class="clr"></div>
                            </div>
                            <div class="b">
                                <div class="b">
                                    <div class="b"></div>
                                </div>
                            </div>
                        </div>
                        <!-- END: 	CONTENT -->
                    </form>


                    <div class="clr"></div>
                </div>
                <div class="clr"></div>
            </div>
        </div>